<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="theme-color" content="#222">
<meta name="generator" content="Hexo 5.4.0">
  <link rel="apple-touch-icon" sizes="180x180" href="/blogwebpage/images/apple-touch-icon-next.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/blogwebpage/images/favicon.ico">
  <link rel="icon" type="image/png" sizes="16x16" href="/blogwebpage/images/favicon.ico">
  <link rel="mask-icon" href="/blogwebpage/images/logo.svg" color="#222">
  <meta name="msvalidate.01" content="9BDlx6FiNE">

<link rel="stylesheet" href="/blogwebpage/css/main.css">


<link rel="stylesheet" href="/blogwebpage/lib/font-awesome/css/all.min.css">

<script id="hexo-configurations">
    var NexT = window.NexT || {};
    var CONFIG = {"hostname":"wangkejie.gitee.io","root":"/blogwebpage/","scheme":"Gemini","version":"7.8.0","exturl":true,"sidebar":{"position":"left","display":"post","padding":18,"offset":12,"onmobile":false},"copycode":{"enable":true,"show_result":true,"style":"default"},"back2top":{"enable":true,"sidebar":false,"scrollpercent":false},"bookmark":{"enable":false,"color":"#222","save":"auto"},"fancybox":false,"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"algolia":{"hits":{"per_page":10},"labels":{"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}},"localsearch":{"enable":true,"trigger":"auto","top_n_per_article":1,"unescape":false,"preload":false},"motion":{"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},"path":"search.xml"};
  </script>

  <meta name="description" content="我不是推广，我也是个学习者，推荐一个慕课网学习，我还专门写了一个笔记博客  iOS面试题大全—全方面剖析面试 UIView与CALayer 事件传递与视图响应链 图像显示原理 UI卡顿掉帧原因 滑动优化方案 UI绘制原理 离屏渲染  UIView与CALayer &lt;单一职责原则&gt;UIView为CALayer提供内容，以及负责处理触摸等事件，参与响应链CALayer负责显示内容cont">
<meta property="og:type" content="article">
<meta property="og:title" content="iOS 面试题(持续更新)">
<meta property="og:url" content="https://wangkejie.gitee.io/blogwebpage/iOS/questions/index.html">
<meta property="og:site_name" content="王科杰">
<meta property="og:description" content="我不是推广，我也是个学习者，推荐一个慕课网学习，我还专门写了一个笔记博客  iOS面试题大全—全方面剖析面试 UIView与CALayer 事件传递与视图响应链 图像显示原理 UI卡顿掉帧原因 滑动优化方案 UI绘制原理 离屏渲染  UIView与CALayer &lt;单一职责原则&gt;UIView为CALayer提供内容，以及负责处理触摸等事件，参与响应链CALayer负责显示内容cont">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://wangkejie.gitee.io/blogwebpage/images/iOS/uiviewuilayer.png">
<meta property="og:image" content="https://wangkejie.gitee.io/blogwebpage/images/iOS/question_event_process.png">
<meta property="og:image" content="https://wangkejie.gitee.io/blogwebpage/images/iOS/imagedisplay.png">
<meta property="og:image" content="https://wangkejie.gitee.io/blogwebpage/images/iOS/kadun.png">
<meta property="og:image" content="https://wangkejie.gitee.io/blogwebpage/images/iOS/uidraw.png">
<meta property="og:image" content="https://wangkejie.gitee.io/blogwebpage/images/iOS/uidrawdisplay.png">
<meta property="og:image" content="https://wangkejie.gitee.io/blogwebpage/images/iOS/asyndraw.png">
<meta property="article:published_time" content="2017-07-10T04:24:27.000Z">
<meta property="article:modified_time" content="2021-06-26T11:33:05.419Z">
<meta property="article:author" content="Jack Wang">
<meta property="article:tag" content="iOS面试题">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://wangkejie.gitee.io/blogwebpage/images/iOS/uiviewuilayer.png">

<link rel="canonical" href="https://wangkejie.gitee.io/blogwebpage/iOS/questions/">


<script id="page-configurations">
  // https://hexo.io/docs/variables.html
  CONFIG.page = {
    sidebar: "",
    isHome : false,
    isPost : true,
    lang   : 'zh-CN'
  };
</script>

  <title>iOS 面试题(持续更新) | 王科杰</title>
  


  <script>
    var _hmt = _hmt || [];
    (function() {
      var hm = document.createElement("script");
      hm.src = "https://hm.baidu.com/hm.js?93e26277de0cf2c5851167f2c6dcaa7d";
      var s = document.getElementsByTagName("script")[0];
      s.parentNode.insertBefore(hm, s);
    })();
  </script>




  <noscript>
  <style>
  .use-motion .brand,
  .use-motion .menu-item,
  .sidebar-inner,
  .use-motion .post-block,
  .use-motion .pagination,
  .use-motion .comments,
  .use-motion .post-header,
  .use-motion .post-body,
  .use-motion .collection-header { opacity: initial; }

  .use-motion .site-title,
  .use-motion .site-subtitle {
    opacity: initial;
    top: initial;
  }

  .use-motion .logo-line-before i { left: initial; }
  .use-motion .logo-line-after i { right: initial; }
  </style>
</noscript>

</head>

<body itemscope itemtype="http://schema.org/WebPage">
  <div class="container use-motion">
    <div class="headband"></div>

    <header class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="切换导航栏">
      <span class="toggle-line toggle-line-first"></span>
      <span class="toggle-line toggle-line-middle"></span>
      <span class="toggle-line toggle-line-last"></span>
    </div>
  </div>

  <div class="site-meta">

    <a href="/blogwebpage/" class="brand" rel="start">
      <span class="logo-line-before"><i></i></span>
      <h1 class="site-title">王科杰</h1>
      <span class="logo-line-after"><i></i></span>
    </a>
      <p class="site-subtitle" itemprop="description">Jack's Notes</p>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger">
        <i class="fa fa-search fa-fw fa-lg"></i>
    </div>
  </div>
</div>




<nav class="site-nav">
  <ul id="menu" class="main-menu menu">
        <li class="menu-item menu-item-home">

    <a href="/blogwebpage/" rel="section"><i class="home fa-fw"></i>首页</a>

  </li>
        <li class="menu-item menu-item-archives">

    <a href="/blogwebpage/archives/" rel="section"><i class="archive fa-fw"></i>归档<span class="badge">52</span></a>

  </li>
        <li class="menu-item menu-item-about">

    <a href="/blogwebpage/me/" rel="section"><i class="user fa-fw"></i>关于</a>

  </li>
        <li class="menu-item menu-item-tags">

    <a href="/blogwebpage/tags/" rel="section"><i class="tags fa-fw"></i>标签<span class="badge">54</span></a>

  </li>
        <li class="menu-item menu-item-categories">

    <a href="/blogwebpage/categories/" rel="section"><i class="th fa-fw"></i>分类<span class="badge">56</span></a>

  </li>
      <li class="menu-item menu-item-search">
        <a role="button" class="popup-trigger"><i class="fa fa-search fa-fw"></i>搜索
        </a>
      </li>
  </ul>
</nav>



  <div class="search-pop-overlay">
    <div class="popup search-popup">
        <div class="search-header">
  <span class="search-icon">
    <i class="fa fa-search"></i>
  </span>
  <div class="search-input-container">
    <input autocomplete="off" autocapitalize="off"
           placeholder="搜索..." spellcheck="false"
           type="search" class="search-input">
  </div>
  <span class="popup-btn-close">
    <i class="fa fa-times-circle"></i>
  </span>
</div>
<div id="search-result">
  <div id="no-result">
    <i class="fa fa-spinner fa-pulse fa-5x fa-fw"></i>
  </div>
</div>

    </div>
  </div>

</div>
    </header>

    
  <div class="back-to-top">
    <i class="fa fa-arrow-up"></i>
    <span>0%</span>
  </div>

  <span class="exturl github-corner" data-url="aHR0cHM6Ly9naXRodWIuY29tL0phY2stVmluZw==" title="Follow me on GitHub" aria-label="Follow me on GitHub"><svg width="80" height="80" viewBox="0 0 250 250" aria-hidden="true"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path></svg></span>


    <main class="main">
      <div class="main-inner">
        <div class="content-wrap">
          

          <div class="content post posts-expand">
            

    
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="https://wangkejie.gitee.io/blogwebpage/iOS/questions/index.html">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/blogwebpage/images/avatar.gif">
      <meta itemprop="name" content="Jack Wang">
      <meta itemprop="description" content="书山有路勤为径，学海无涯苦作舟！">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="王科杰">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          iOS 面试题(持续更新)
        </h1>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-calendar"></i>
              </span>
              <span class="post-meta-item-text">发表于</span>

              <time title="创建时间：2017-07-10 12:24:27" itemprop="dateCreated datePublished" datetime="2017-07-10T12:24:27+08:00">2017-07-10</time>
            </span>
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-folder"></i>
              </span>
              <span class="post-meta-item-text">分类于</span>
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/blogwebpage/categories/iOS/" itemprop="url" rel="index"><span itemprop="name">iOS</span></a>
                </span>
                  ，
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/blogwebpage/categories/iOS/iOS%E9%9D%A2%E8%AF%95%E9%A2%98/" itemprop="url" rel="index"><span itemprop="name">iOS面试题</span></a>
                </span>
            </span>

          

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
        <blockquote>
<p>我不是推广，我也是个学习者，推荐一个慕课网学习，我还专门写了一个<a href="./iOS/study.html">笔记博客</a></p>
</blockquote>
<h1 id="iOS面试题大全—全方面剖析面试"><a href="#iOS面试题大全—全方面剖析面试" class="headerlink" title="iOS面试题大全—全方面剖析面试"></a>iOS面试题大全—全方面剖析面试</h1><ul>
<li>UIView与CALayer</li>
<li>事件传递与视图响应链</li>
<li>图像显示原理</li>
<li>UI卡顿掉帧原因</li>
<li>滑动优化方案</li>
<li>UI绘制原理</li>
<li>离屏渲染</li>
</ul>
<h2 id="UIView与CALayer"><a href="#UIView与CALayer" class="headerlink" title="UIView与CALayer"></a>UIView与CALayer</h2><img src="/blogwebpage/images/iOS/uiviewuilayer.png" class="" title="uiviewuilayer">
<p>&lt;单一职责原则&gt;<br>UIView为CALayer提供内容，以及负责处理触摸等事件，参与响应链<br>CALayer负责显示内容contents</p>
<h2 id="事件传递与视图响应链"><a href="#事件传递与视图响应链" class="headerlink" title="事件传递与视图响应链"></a>事件传递与视图响应链</h2><figure class="highlight erlang"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">- <span class="params">(UIView *)</span>hitTest:<span class="params">(CGPoint)</span>point withEvent:<span class="params">(UIEvent *)</span>event;</span><br><span class="line"></span><br><span class="line">- <span class="params">(BOOL)</span>pointInside:<span class="params">(CGPoint)</span>point withEvent:<span class="params">(UIEvent *)</span>event;</span><br></pre></td></tr></table></figure>
<img src="/blogwebpage/images/iOS/question_event_process.png" class="" title="question_event_process">
<p>如果事件一直传递到UIAppliction还是没处理，那就会忽略掉</p>
<h2 id="图像显示原理"><a href="#图像显示原理" class="headerlink" title="图像显示原理"></a>图像显示原理</h2><ol>
<li>CPU:输出位图</li>
<li>GPU :图层渲染，纹理合成</li>
<li>把结果放到帧缓冲区(frame buffer)中</li>
<li>再由视频控制器根据vsync信号在指定时间之前去提取帧缓冲区的屏幕显示内容</li>
<li>显示到屏幕上<img src="/blogwebpage/images/iOS/imagedisplay.png" class="" title="imagedisplay"></li>
</ol>
<p>CPU工作</p>
<ol>
<li>Layout: UI布局，文本计算</li>
<li>Display: 绘制</li>
<li>Prepare: 图片解码</li>
<li>Commit：提交位图</li>
</ol>
<p>GPU渲染管线(OpenGL)</p>
<ul>
<li>顶点着色，图元装配，光栅化，片段着色，片段处理</li>
</ul>
<h2 id="UI卡顿掉帧原因"><a href="#UI卡顿掉帧原因" class="headerlink" title="UI卡顿掉帧原因"></a>UI卡顿掉帧原因</h2><img src="/blogwebpage/images/iOS/kadun.png" class="" title="kadun">
<p>iOS设备的硬件时钟会发出Vsync（垂直同步信号），然后App的CPU会去计算屏幕要显示的内容，之后将计算好的内容提交到GPU去渲染。随后，GPU将渲染结果提交到帧缓冲区，等到下一个VSync到来时将缓冲区的帧显示到屏幕上。也就是说，一帧的显示是由CPU和GPU共同决定的。<br>一般来说，页面滑动流畅是60fps，也就是1s有60帧更新，即每隔16.7ms就要产生一帧画面，而如果CPU和GPU加起来的处理时间超过了16.7ms，就会造成掉帧甚至卡顿。</p>
<h2 id="滑动优化方案"><a href="#滑动优化方案" class="headerlink" title="滑动优化方案"></a>滑动优化方案</h2><p>CPU：把以下操作放在子线程中</p>
<ol>
<li>对象创建、调整、销毁</li>
<li>预排版（布局计算、文本计算、缓存高度等等）</li>
<li>预渲染（文本等异步绘制，图片解码等）<br>GPU:</li>
</ol>
<ul>
<li>纹理渲染，视图混合</li>
<li>一般遇到性能问题时，考虑以下问题：<ul>
<li>是否受到CPU或者GPU的限制？</li>
<li>是否有不必要的CPU渲染？</li>
<li>是否有太多的离屏渲染操作？</li>
<li>是否有太多的图层混合操作？</li>
<li>是否有奇怪的图片格式或者尺寸？</li>
<li>是否涉及到昂贵的view或者效果？</li>
<li>view的层次结构是否合理？</li>
</ul>
</li>
</ul>
<h2 id="UI绘制原理"><a href="#UI绘制原理" class="headerlink" title="UI绘制原理"></a>UI绘制原理</h2><img src="/blogwebpage/images/iOS/uidraw.png" class="" title="uidraw">
<img src="/blogwebpage/images/iOS/uidrawdisplay.png" class="" title="uidrawdisplay">
<p>异步绘制：</p>
<ul>
<li>[self.layer.delegate displayLayer: ]</li>
<li>代理负责生成对应的bitmap</li>
<li>设置该bitmap作为该layer.contents属性的值<img src="/blogwebpage/images/iOS/asyndraw.png" class="" title="asyndraw"></li>
</ul>
<h2 id="离屏渲染"><a href="#离屏渲染" class="headerlink" title="离屏渲染"></a>离屏渲染</h2><p>On-Screen Rendering:当前屏幕渲染，指的是GPU的渲染操作是在当前用于显示的屏幕缓冲区中进行<br>Off-Screen Rendering:离屏渲染，分为CPU离屏渲染和GPU离屏渲染两种形式。GPU离屏渲染指的是GPU在当前屏幕缓冲区外新开辟一个缓冲区进行渲染操作<br>应当尽量避免的则是GPU离屏渲染<br>GPU离屏渲染何时会触发呢？<br>圆角（当和maskToBounds一起使用时）、图层蒙版、阴影，设置</p>
<blockquote>
<p>layer.shouldRasterize ＝ YES</p>
</blockquote>
<p>为什么要避免GPU离屏渲染？</p>
<ul>
<li>GPU需要做额外的渲染操作。通常GPU在做渲染的时候是很快的，但是涉及到offscreen-render的时候情况就可能有些不同，因为需要额外开辟一个新的缓冲区进行渲染，然后绘制到当前屏幕的过程需要做onscreen跟offscreen上下文之间的切换，这个过程的消耗会比较昂贵，涉及到OpenGL的pipeline跟barrier，而且offscreen-render在每一帧都会涉及到，因此处理不当肯定会对性能产生一定的影响。另外由于离屏渲染会增加GPU的工作量，可能会导致CPU+GPU的处理时间超出16.7ms，导致掉帧卡顿。所以可以的话应尽量减少offscreen-render的图层</li>
</ul>
<h1 id="Runtime-RunLoop-面试请看我相关具体博客内容，不再累赘"><a href="#Runtime-RunLoop-面试请看我相关具体博客内容，不再累赘" class="headerlink" title="Runtime/RunLoop 面试请看我相关具体博客内容，不再累赘"></a>Runtime/RunLoop 面试请看我相关具体博客内容，不再累赘</h1><h1 id="暂停，不定期更新，看心情。。。。。"><a href="#暂停，不定期更新，看心情。。。。。" class="headerlink" title="暂停，不定期更新，看心情。。。。。"></a>暂停，不定期更新，看心情。。。。。</h1>
    </div>

    
    
    
        <div class="reward-container">
  <div>希望对您有所帮助，您的支持将是我莫大的动力！</div>
  <button onclick="var qr = document.getElementById('qr'); qr.style.display = (qr.style.display === 'none') ? 'block' : 'none';">
    打赏
  </button>
  <div id="qr" style="display: none;">
      
      <div style="display: inline-block;">
        <img src="/blogwebpage/images/wechatpay.png" alt="Jack Wang 微信支付">
        <p>微信支付</p>
      </div>
      
      <div style="display: inline-block;">
        <img src="/blogwebpage/images/alipay.png" alt="Jack Wang 支付宝">
        <p>支付宝</p>
      </div>

  </div>
</div>


      <footer class="post-footer">
          <div class="post-tags">
              <a href="/blogwebpage/tags/iOS%E9%9D%A2%E8%AF%95%E9%A2%98/" rel="tag"># iOS面试题</a>
          </div>

        


        
    <div class="post-nav">
      <div class="post-nav-item">
    <a href="/blogwebpage/iOS/questions/resolved.html" rel="prev" title="iOS解决过的问题汇总">
      <i class="fa fa-chevron-left"></i> iOS解决过的问题汇总
    </a></div>
      <div class="post-nav-item">
    <a href="/blogwebpage/vue/qa.html" rel="next" title="Vue知识">
      Vue知识 <i class="fa fa-chevron-right"></i>
    </a></div>
    </div>
      </footer>
    
  </article>
  
  
  



          </div>
          

<script>
  window.addEventListener('tabs:register', () => {
    let { activeClass } = CONFIG.comments;
    if (CONFIG.comments.storage) {
      activeClass = localStorage.getItem('comments_active') || activeClass;
    }
    if (activeClass) {
      let activeTab = document.querySelector(`a[href="#comment-${activeClass}"]`);
      if (activeTab) {
        activeTab.click();
      }
    }
  });
  if (CONFIG.comments.storage) {
    window.addEventListener('tabs:click', event => {
      if (!event.target.matches('.tabs-comment .tab-content .tab-pane')) return;
      let commentClass = event.target.classList[1];
      localStorage.setItem('comments_active', commentClass);
    });
  }
</script>

        </div>
          
  
  <div class="toggle sidebar-toggle">
    <span class="toggle-line toggle-line-first"></span>
    <span class="toggle-line toggle-line-middle"></span>
    <span class="toggle-line toggle-line-last"></span>
  </div>

  <aside class="sidebar">
    <div class="sidebar-inner">

      <ul class="sidebar-nav motion-element">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <!--noindex-->
      <div class="post-toc-wrap sidebar-panel">
          <div class="post-toc motion-element"><ol class="nav"><li class="nav-item nav-level-1"><a class="nav-link" href="#iOS%E9%9D%A2%E8%AF%95%E9%A2%98%E5%A4%A7%E5%85%A8%E2%80%94%E5%85%A8%E6%96%B9%E9%9D%A2%E5%89%96%E6%9E%90%E9%9D%A2%E8%AF%95"><span class="nav-number">1.</span> <span class="nav-text">iOS面试题大全—全方面剖析面试</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#UIView%E4%B8%8ECALayer"><span class="nav-number">1.1.</span> <span class="nav-text">UIView与CALayer</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E4%BA%8B%E4%BB%B6%E4%BC%A0%E9%80%92%E4%B8%8E%E8%A7%86%E5%9B%BE%E5%93%8D%E5%BA%94%E9%93%BE"><span class="nav-number">1.2.</span> <span class="nav-text">事件传递与视图响应链</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%9B%BE%E5%83%8F%E6%98%BE%E7%A4%BA%E5%8E%9F%E7%90%86"><span class="nav-number">1.3.</span> <span class="nav-text">图像显示原理</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#UI%E5%8D%A1%E9%A1%BF%E6%8E%89%E5%B8%A7%E5%8E%9F%E5%9B%A0"><span class="nav-number">1.4.</span> <span class="nav-text">UI卡顿掉帧原因</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E6%BB%91%E5%8A%A8%E4%BC%98%E5%8C%96%E6%96%B9%E6%A1%88"><span class="nav-number">1.5.</span> <span class="nav-text">滑动优化方案</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#UI%E7%BB%98%E5%88%B6%E5%8E%9F%E7%90%86"><span class="nav-number">1.6.</span> <span class="nav-text">UI绘制原理</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E7%A6%BB%E5%B1%8F%E6%B8%B2%E6%9F%93"><span class="nav-number">1.7.</span> <span class="nav-text">离屏渲染</span></a></li></ol></li><li class="nav-item nav-level-1"><a class="nav-link" href="#Runtime-RunLoop-%E9%9D%A2%E8%AF%95%E8%AF%B7%E7%9C%8B%E6%88%91%E7%9B%B8%E5%85%B3%E5%85%B7%E4%BD%93%E5%8D%9A%E5%AE%A2%E5%86%85%E5%AE%B9%EF%BC%8C%E4%B8%8D%E5%86%8D%E7%B4%AF%E8%B5%98"><span class="nav-number">2.</span> <span class="nav-text">Runtime&#x2F;RunLoop 面试请看我相关具体博客内容，不再累赘</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#%E6%9A%82%E5%81%9C%EF%BC%8C%E4%B8%8D%E5%AE%9A%E6%9C%9F%E6%9B%B4%E6%96%B0%EF%BC%8C%E7%9C%8B%E5%BF%83%E6%83%85%E3%80%82%E3%80%82%E3%80%82%E3%80%82%E3%80%82"><span class="nav-number">3.</span> <span class="nav-text">暂停，不定期更新，看心情。。。。。</span></a></li></ol></div>
      </div>
      <!--/noindex-->

      <div class="site-overview-wrap sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <img class="site-author-image" itemprop="image" alt="Jack Wang"
      src="/blogwebpage/images/avatar.gif">
  <p class="site-author-name" itemprop="name">Jack Wang</p>
  <div class="site-description" itemprop="description">书山有路勤为径，学海无涯苦作舟！</div>
</div>
<div class="site-state-wrap motion-element">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
          <a href="/blogwebpage/archives/">
        
          <span class="site-state-item-count">52</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
      <div class="site-state-item site-state-categories">
            <a href="/blogwebpage/categories/">
          
        <span class="site-state-item-count">56</span>
        <span class="site-state-item-name">分类</span></a>
      </div>
      <div class="site-state-item site-state-tags">
            <a href="/blogwebpage/tags/">
          
        <span class="site-state-item-count">54</span>
        <span class="site-state-item-name">标签</span></a>
      </div>
  </nav>
</div>
  <div class="links-of-author motion-element">
      <span class="links-of-author-item">
        <span class="exturl" data-url="aHR0cHM6Ly9naXRodWIuY29tL0phY2stVmluZw==" title="GitHub → https:&#x2F;&#x2F;github.com&#x2F;Jack-Ving"><i class="github fa-fw"></i>GitHub</span>
      </span>
      <span class="links-of-author-item">
        <span class="exturl" data-url="bWFpbHRvOjcyNzg4MTk0NUBxcS5jb20=" title="E-Mail → mailto:727881945@qq.com"><i class="envelope fa-fw"></i>E-Mail</span>
      </span>
  </div>



      </div>

    </div>
  </aside>
  <div id="sidebar-dimmer"></div>


      </div>
    </main>

    <footer class="footer">
      <div class="footer-inner">
        

        
  <div class="beian"><span class="exturl" data-url="aHR0cHM6Ly9iZWlhbi5taWl0Lmdvdi5jbg==">京ICP备16036665号-2 </span>
  </div>

<div class="copyright">
  
  &copy; 
  <span itemprop="copyrightYear">2021</span>
  <span class="with-love">
    <i class="heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">Jack Wang</span>
</div>
  <div class="powered-by">由 <span class="exturl theme-link" data-url="aHR0cHM6Ly9oZXhvLmlv">Hexo</span> & <span class="exturl theme-link" data-url="aHR0cHM6Ly90aGVtZS1uZXh0Lm9yZw==">NexT.Gemini</span> 强力驱动
  </div>

        


  <div style="display: none;">
    <script src="//s95.cnzz.com/z_stat.php?id=1277804316&web_id=1277804316"></script>
  </div>






      </div>
    </footer>
  </div>

  
  <script src="/blogwebpage/lib/anime.min.js"></script>
  <script src="/blogwebpage/lib/velocity/velocity.min.js"></script>
  <script src="/blogwebpage/lib/velocity/velocity.ui.min.js"></script>

<script src="/blogwebpage/js/utils.js"></script>

<script src="/blogwebpage/js/motion.js"></script>


<script src="/blogwebpage/js/schemes/pisces.js"></script>


<script src="/blogwebpage/js/next-boot.js"></script>




  
  <script>
    (function(){
      var canonicalURL, curProtocol;
      //Get the <link> tag
      var x=document.getElementsByTagName("link");
		//Find the last canonical URL
		if(x.length > 0){
			for (i=0;i<x.length;i++){
				if(x[i].rel.toLowerCase() == 'canonical' && x[i].href){
					canonicalURL=x[i].href;
				}
			}
		}
    //Get protocol
	    if (!canonicalURL){
	    	curProtocol = window.location.protocol.split(':')[0];
	    }
	    else{
	    	curProtocol = canonicalURL.split(':')[0];
	    }
      //Get current URL if the canonical URL does not exist
	    if (!canonicalURL) canonicalURL = window.location.href;
	    //Assign script content. Replace current URL with the canonical URL
      !function(){var e=/([http|https]:\/\/[a-zA-Z0-9\_\.]+\.baidu\.com)/gi,r=canonicalURL,t=document.referrer;if(!e.test(r)){var n=(String(curProtocol).toLowerCase() === 'https')?"https://sp0.baidu.com/9_Q4simg2RQJ8t7jm9iCKT-xh_/s.gif":"//api.share.baidu.com/s.gif";t?(n+="?r="+encodeURIComponent(document.referrer),r&&(n+="&l="+r)):r&&(n+="?l="+r);var i=new Image;i.src=n}}(window);})();
  </script>




  
<script src="/blogwebpage/js/local-search.js"></script>













  

  

</body>
</html>
